{include file='public/meta' }
	<title>密码重置 - 木鱼内容管理系统</title>
</head>
<body>
	<div style="text-align: center;">
		<form class="layui-form">
		    <div class="layui-form-item">
		        <div class="layui-inline">
					<h1>MuYuCMS</h1>
					<div class="layui-form-item">
					    <label class="layui-form-label">账号:</label>
					    <div class="layui-input-inline">
					         <input type="text" name="name" value=""  lay-verify="required" autocomplete="off" class="layui-input">
					    </div>
					</div>
					<div class="layui-form-item">
					    <label class="layui-form-label">重置密码:</label>
					    <div class="layui-input-inline">
					         <input type="text" name="password" value=""  lay-verify="required" placeholder="请输入新密码!" autocomplete="off" class="layui-input">
					    </div>
					</div>
					<div class="layui-form-item">
					    <label class="layui-form-label">安全密令:</label>
					    <div class="layui-input-inline">
					         <input type="text" name="publishkey" value=""  lay-verify="required" placeholder="请输入安全密令!" autocomplete="off" class="layui-input">
					    </div>
					</div>
					<div class="layui-form-item">
					    <div class="layui-input-block">
					        <button class="layui-btn" lay-submit lay-filter="safety-subts" type="button">确认重置</button>
					    </div>
					</div>
		        </div>
		    </div>
		</form>
	</div>
{include file='public/footer' }
<script type="text/javascript">
  layui.config({
    base: '__ADMINST__layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['form'],function(){
      var $ = layui.$
    ,form = layui.form ;
	
	form.on('submit(safety-subts)', function(data){
	    var D = data.field;
		ajaxcrea(D,"{:url('admin/Findpassword/updatepassword')}");
	    return false;
	});
	
	});
	function ajaxcrea(Data,url){
		$.ajax({
		    type: 'POST',
		    data: Data,
		    url: url,
		    dataType: "json",
		    beforeSend: function() {
		        index = layer.load();
		    },
		    success: function(data) {
		        if(data.code === 1){
		            layer.msg(data.msg, {time: 2000}, function() {
		                location.reload();
		            });
		        }else{
		            layer.msg(data.msg, {time: 2000});
		        }
		    },
		    complete: function() {
		        layer.close(index);
		    }
		});
	}
	</script>
</body>
</html>